package com.sxpi.user.controller;

import com.sxpi.common.result.R;
import com.sxpi.user.service.user.IUserService;
import com.sxpi.user.dto.LoginDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 董伟豪
 * @Date: 2022/10/2 17:29
 */
@RestController
public class LoginController {

    @Autowired
    private IUserService userService;

    /**
     * 用户登录获取openid
     * @param loginVo
     * @return
     */
    @PostMapping("/user/login")
    public R login(@RequestBody LoginDto loginVo){
        return userService.login(loginVo);
    }

}
